﻿<%@ Page Language="C#" AutoEventWireup="false" CodeFile="recSanctionReviewform.aspx.cs"
    Inherits="SIPO.Web.Forms.Transaction.recSanctionReviewform" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Sanction Review Form</title>

    <link href="<%= ResolveUrl("~/styles/chosen/chosen.min.css") %>" rel="stylesheet" type="text/css" />

    <script src="<%= ResolveUrl("~/scripts/plupload/moxie.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/plupload/plupload.full.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.validate.wrapper.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.inputmask.bundle.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/chosen/chosen.jquery.min.js") %>" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function () {

            $("#btnSave").button({ icons: { primary: "ui-icon-disk"} });
            $("#btnClose").button({ icons: { primary: "ui-icon-close"} });

            $('#btnClose').click(function () {
                parent.$('#dialog').dialog("close");
                return false;
            });

        });

    </script>
    <script type="text/javascript">

        $(document).ready(function () {

            $("#txtValue").inputmask("decimal", { radixPoint: ",", autoGroup: true, groupSeparator: ".", groupSize: 3, digits: 2, repeat: 18 });

            $("#btnSave").click(function (e) {

                var tglreview = $('#<%= hdReviewDate.ClientID %>').val(); 
                if (tglreview != "") {

                    alert("Data tidak bisa di review karena data sudah  di review !");
                }
                else {
                    var result = window.confirm('Benar data akan di review ?');
                    if (result) {
                        ReviewData();
                    }
                }

            });

            function ReviewData() {

                var id = $('#<%= hfID.ClientID %>').val();
                var objrecSanction = new Object();
                objrecSanction.SanctionID = id;
                jsonData = JSON.stringify(objrecSanction);
                var handlerUrl = '<%= ResolveUrl("~/ajaxhandler/transaction/recSanctionhandler.ashx") %>';
                CallAjax(handlerUrl, "?method=review", jsonData);
                parent.$('#dialog').dialog('close');
                setTimeout("parent.$('#table').trigger('reloadGrid');", 3000);
                return false;

            }

        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0">
        <tr>
            <td style="width: 50">
                Debitur
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox runat="server" Enabled="false" Width="300" ID="txtDebitur"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Sub Sektor
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox runat="server" Enabled="false" Width="300" ID="txtSubSector"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Sub Sub Sektor
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox runat="server" Enabled="false" Width="300" ID="txtSubSubSector"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Tipe Sanksi
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox runat="server" Enabled="false" Width="300" ID="txtTransType"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Jumlah
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtValue" Enabled="false"  Style="text-align: right" runat="server" Width="200"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                No. Surat Sanksi
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtLetterNo" Enabled="false" runat="server" MaxLength="20" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Tgl Surat Sanksi
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtLetterDate" Enabled="false" runat="server" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 50">
                Lampiran
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtFileName" Enabled="false" runat="server" Width="300"></asp:TextBox>
            </td>
        </tr>
        <tr runat="server" id="trInvoice" visible="false">
            <td style="width: 50">
                No. Surat Setoran
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtInvoiceNo" Enabled="false" runat="server" Width="300"></asp:TextBox>
            </td>
        </tr>
        <tr runat="server" id="trInvoiceDate" visible="false">
            <td style="width: 50">
                Tgl. Surat Setoran
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtInvoiceDate" Enabled="false" runat="server" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr runat="server" id="trPayment" visible="false">
            <td style="width: 50">
                No. Pembayaran
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtPaymentNo" Enabled="false" runat="server" Width="300"></asp:TextBox>
            </td>
        </tr>
        <tr runat="server" id="trPaymentDate" visible="false">
            <td style="width: 50">
                Tgl Pembayaran
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtPaymentDate" Enabled="false" runat="server" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr id="trReviewDate" runat="server" visible="false">
            <td style="width: 50">
                Tgl Review
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtReviewDate" Enabled="false" runat="server" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr id="trReviewBy" runat="server" visible="false">
            <td style="width: 50">
                Direview Oleh
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtReviewBy" Enabled="false" runat="server" Width="100"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;
            </td>
            <td>
                <div style="text-align: right; padding-top: 10px;">
                    <button id="btnSave" type="button">
                        Review</button>
                    <button id="btnClose" type="button">
                        Close</button>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;
            </td>
            <td>
                <asp:HiddenField ID="hfID" runat="server" />
                <asp:HiddenField ID="hdReviewDate" runat="server" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
